#
# Project Properties
#
CMAKE_MINIMUM_REQUIRED (VERSION 2.6.2)
PROJECT (PushDemo)
SET (APPLICATION_CODENAME "${PROJECT_NAME}")
SET (APPLICATION_COPYRIGHT_YEARS "2013")
SET (APPLICATION_VERSION_MAJOR 1)
SET (APPLICATION_VERSION_MINOR 0)
SET (APPLICATION_VERSION_PATCH 0)
SET (APPLICATION_VERSION_TYPE SNAPSHOT)
SET (APPLICATION_VERSION_STRING "${APPLICATION_VERSION_MAJOR}.${APPLICATION_VERSION_MINOR}.${APPLICATION_VERSION_PATCH}-${APPLICATION_VERSION_TYPE}")
SET (APPLICATION_VENDOR_ID "com.cfood")
SET (APPLICATION_VENDOR_NAME "cfood")
SET (APPLICATION_VENDOR_URL "www.cfood.com")
SET (APPLICATION_ID "${APPLICATION_VENDOR_ID}.${PROJECT_NAME}")

SET(CXX_FLAGS
 -g
 -rdynamic
 -fPIC
 -Wall
 -Wextra
 -Werror
 -Woverloaded-virtual
 -Wpointer-arith
 -Wwrite-strings
 -Wno-unused-parameter
 -Wno-reorder
 -Wno-unused-variable
 -DVALGRIND
 -D_FILE_OFFSET_BITS=64
 -DHAVE_STDINT_H
 -DHAVE_INTTYPES_H
 #-DHAVE_CONFIG_H
 #-DHAVE_NETINET_IN_H
 )

STRING(REPLACE ";" " " CMAKE_CXX_FLAGS "${CXX_FLAGS}")

FIND_PACKAGE(Boost REQUIRED)
INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIRS})

FIND_LIBRARY(GLOG_LIBRARY NAMES glog)
FIND_LIBRARY(GFLAGS_LIBRARY NAMES gflags)
FIND_LIBRARY(BOOST_SYSTEM_LIBRARY NAMES boost_system)
FIND_LIBRARY(BOOST_THREAD_LIBRARY NAMES boost_thread)
FIND_LIBRARY(GTEST_LIBRARY NAMES gtest)
FIND_LIBRARY(CURL_LIBRARY NAMES curl)

LINK_LIBRARIES(
  ${BOOST_SYSTEM_LIBRARY} ${BOOST_THREAD_LIBRARY}
  ${GLOG_LIBRARY} ${GFLAGS_LIBRARY} ${GTEST_LIBRARY}
  ${CURL_LIBRARY}
  pthread)

add_subdirectory (src) 
add_subdirectory (test)
enable_testing ()
add_test (NAME async_http_test COMMAND async_http_test)

